/**
 * 职位
 * 需要按照企业去存储职称
 * 企业id为null的是系统默认的职称，不允许修改
 */

const sequelize = require('./db')
const { DataTypes } = require('sequelize')
const Group = require('./Group')
const Post = sequelize.define('Post', {
    id: { type: DataTypes.INTEGER, autoIncrement: true, primaryKey: true },
    name: { type: DataTypes.STRING, allowNull: false }
})
Group.hasMany(Post)
Post.belongsTo(Group)
module.exports = Post